package com.sptpc.demo.vo;

import com.sptpc.demo.model.Category;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.joda.money.Money;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class DrinkWithCategoryVo {
    private Long id;

    private String name;

    private Money price;

    private Category category; // Drink * -> 1 Category
}
 // 1. sql
//    SELECT d.id id, d.name name, price, tc.id cid, tc.name cname
//    from t_drink d inner JOIN t_category tc on d.category_id = tc.id

//2.定义map orm转换规则
